package com.hujiang.basic.search.model;

import com.alibaba.fastjson.JSONObject;

import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = true)
public class HJUpdateResponse extends HJEsResponse {

    private static final long serialVersionUID = 1L;

    private boolean exist;
    
    private JSONObject source;

    @Override
    public boolean equals(Object o) {
        if ( this == o ) {
            return true;
        }
        if ( o == null || getClass() != o.getClass() ) {
            return false;
        }
        HJUpdateResponse updateResponse = (HJUpdateResponse)o;
        if(!updateResponse.getId().equals(this.getId())){
            return false;
        }
        if(updateResponse.getSource()!=this.getSource()){
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        return this.hashCode();
    }
}
